<template>
  <h1 class="text-white text-[28px] font-bold mt-[10px] mb-2">全勤指挥部</h1>
  <!-- 顶部逻辑图 -->
  <div style="background: rgba(1, 10, 15, 0.5);padding: 10px;">
    <div class="flex">
      <img src="@/assets/image/titleBg.png" />
      <h1 class="text-white text-[20px] font-bold ml-[10px] ">前方指挥部</h1>
    </div>
    <div class="logic-one">
      <div class="fu">
        <div>
          <div class=""> 代班领导 </div>
          <div class="">王强</div>
        </div>
        <span></span>
      </div>
      <div class="fuzi">
        <div>
          <div class=""> 代班领导 </div>
          <div class="">王强</div>
        </div>
        <span></span>
      </div>
      <div class="fuzizi">
        <div>
          <div class=""> 指挥长(102) </div>
          <div class="">王强</div>
        </div>
        <span></span>
      </div>
      <div class="box">
        <div v-for="(v, i) in logicList1" :key="i" :class="{
          zi: v.ind <= logicList1.length / 2,
          zi1: v.ind > logicList1.length / 2,
          activeGroup: activeGroup == v.groupName,
        }" @click="checkGroup(v)">
          <p></p>
          <font>{{ v.groupName }}</font>
        </div>
      </div>
    </div>
    <div class="logic-two">
      <div class="fu">
        <div>
          <div class=""> 代班领导 </div>
          <div class="">王强</div>
        </div>
        <span></span>
      </div>
      <div class="box">
        <div v-for="(v, i) in logicList2" :key="i" :class="{
          zi: v.ind <= logicList2.length / 2,
          zi1: v.ind > logicList2.length / 2,
          activeGroup: activeGroup == v.type,
        }" @click="checkGroup(v)">
          <p></p>
          <font>
            <div class=""> {{ v.type }} </div>
            <div class=""> {{ v.name }}</div>
          </font>
        </div>
      </div>
    </div>
  </div>
  <div class="mt-[20px]" style="background: rgba(1, 10, 15, 0.5);padding: 10px;">
    <div class="flex">
      <img src="@/assets/image/titleBg.png" />
      <h1 class="text-white text-[20px] font-bold ml-[10px] ">后方指挥部 </h1>
    </div>
    <div class="logic-three">
      <div class="fu">
        <div>
          <div class=""> 代班领导 </div>
          <div class="">王强</div>
        </div>
        <span></span>
      </div>
      <div class="fuzizi">
        <div>
          <div class=""> 代班领导 </div>
          <div class="">王强</div>
        </div>
        <!-- <span></span> -->
      </div>
      <div class="box">
        <div v-for="(v, i) in logicList3" :key="i" :class="{
          zi: v.ind <= logicList3.length / 2,
          zi1: v.ind > logicList3.length / 2,
          activeGroup: activeGroup == v.groupName,
        }" @click="checkGroup(v)">
          <p></p>
          <font>{{ v.groupName }}</font>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang='ts'>
const logicList1: any = ref([
  {
    ind: 0,
    groupName: '作 战 助 理  张 凌 云'
  },
  {
    ind: 1,
    groupName: '作 战 助 理  张 凌 云'
  },
  {
    ind: 2,
    groupName: '作 战 助 理  张 凌 云'
  },
  {
    ind: 3,
    groupName: '作 战 助 理  张 凌 云'
  },
  {
    ind: 4,
    groupName: '作 战 助 理  张 凌 云'
  },
  {
    ind: 5,
    groupName: '作 战 助 理  张 凌 云'
  },
  {
    ind: 6,
    groupName: '作 战 助 理  张 凌 云'
  },
])
const logicList2: any = ref([
  {
    ind: 0,
    type: '防火监督',
    name: '王强'
  },
  {
    ind: 1,
    type: '防火监督',
    name: '王强'
  },
  {
    ind: 2,
    type: '防火监督',
    name: '王强'
  }
])
const logicList3: any = ref([
])
const activeGroup = ref()
const checkGroup = (val: any) => {

}
</script>
<style lang='less' scoped>
.logic-one {
  margin-top: 20px;
  width: 460px;
  // height: 500px;
  padding: 10px 0;
  
  display: flex;
  align-items: center;
  box-sizing: border-box;
  flex-direction: column;
  overflow-x: auto;
  position: relative;

  div {
    font-size: 20px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #ffffff;
  }

  .fu {
    width: 150px;
    height: 60px;
    color: #00ffff;
    border: 1px solid #00FFCC;
    line-height: 26px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    text-align: center;
    position: relative;
    top: 0px;

    // top: -200px;
    span {
      position: absolute;
      display: inline-block;
      width: 2px;
      height: 90px;
      background: #00ffff;
      top: 60px;
      left: 75px;
    }
  }

  .fuzi {
    width: 150px;
    height: 60px;
    color: #00ffff;
    border: 1px solid #00FFCC;
    line-height: 26px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    text-align: center;
    position: relative;
    top: 15px;
    right: 130px;

    span {
      position: absolute;
      display: inline-block;
      width: 55px;
      height: 2px;
      background: #00ffff;
      top: 30px;
      left: 150px;
    }
  }



  .fuzizi {
    width: 150px;
    height: 60px;
    color: #00ffff;
    border: 1px solid #00FFCC;
    line-height: 26px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    text-align: center;
    position: relative;
    top: 30px;

    // top: -200px;
    span {
      position: absolute;
      display: inline-block;
      width: 2px;
      height: 20px;
      background: #00ffff;
      top: 60px;
      left: 75px;
    }
  }

  .box {
    width: auto;
    height: auto;
    // position: absolute;
    margin: 75px 0 0 0;
    display: flex;
    top: 150px;
    left: 10px;

    .zi {
      width: 50px;
      height: 200px;
      background: rgba(0, 0, 0, 0.6);
      border: 1px solid #00FFCC;
      font-size: 18px;
      border-radius: 4px;
      position: relative;
      margin: 0 10px 0 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      writing-mode: vertical-rl;
      /*从左向右 从右向左是 writing-mode: vertical-rl;*/
      writing-mode: tb-rl;
      /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl；*/
      text-align: center;
      // letter-spacing: 0.3em;

      p {
        width: 60px;
        height: 22px;
        border: solid 1px #00ffff;
        border-right: none;
        border-bottom: none;
        position: absolute;
        top: -22px;
        left: 20px;
      }

      font {
        height: 100%;
        white-space: nowrap;
        overflow: hidden;
        word-break: keep-all;
        text-overflow: ellipsis;
      }

      span {
        display: inline-block;
        width: 2px;
        height: 24px;
        background: #00ffff;
        position: absolute;
        bottom: -23px;
        left: 20px;
      }
    }

    .btnBox {
      position: absolute;
      right: -20px;
      display: flex;
      flex-direction: column;
      flex-wrap: wrap;
      width: 20px;
      height: 20px;

      .el-button.is-circle {
        padding: 1px !important;
      }

      :deep(.el-button:hover ){
        width: 15px;
        height: 15px;
      }
    }

    .zi1 {
      width: 50px;
      height: 200px;
      background: rgba(0, 0, 0, 0.6);
      border: 1px solid #00FFCC;
      border-radius: 4px;
      position: relative;
      margin: 0 0 0 10px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      writing-mode: vertical-rl;
      /*从左向右 从右向左是 writing-mode: vertical-rl;*/
      writing-mode: tb-rl;
      /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl；*/
      text-align: center;
      // letter-spacing: 0.3em;
      font-size: 18px;

      p {
        width: 93px;
        height: 22px;
        border: solid 1px #00ffff;
        border-left: none;
        border-bottom: none;
        position: absolute;
        top: -22px;
        left: -70px;
      }

      font {
        height: 100%;
        white-space: nowrap;
        overflow: hidden;
        word-break: keep-all;
        text-overflow: ellipsis;
      }

      span {
        display: inline-block;
        width: 2px;
        height: 24px;
        background: #00ffff;
        position: absolute;
        bottom: -23px;
        left: 20px;
      }
    }

    .zi:hover,
    .zi1:hover {
      background: linear-gradient(0deg, #0177bb 0%, #0096ff 98%);
      color: #fff;
    }

    .activeGroup {
      background: linear-gradient(0deg, #0177bb 0%, #0096ff 98%);
      color: #fff;
    }
  }
}

.logic-two {
  margin-top: 20px;
  width: 460px;
  // height: 200px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  flex-direction: column;
  overflow-x: auto;
  position: relative;

  div {
    font-size: 20px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #ffffff;
  }

  .fu {
    width: 150px;
    height: 60px;
    color: #00ffff;
    border: 1px solid #00FFCC;
    line-height: 26px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    text-align: center;
    position: relative;
    top: 0px;

    // top: -200px;
    span {
      position: absolute;
      display: inline-block;
      width: 2px;
      height: 30px;
      background: #00ffff;
      top: 60px;
      left: 75px;
    }
  }

  .fuzi {
    width: 150px;
    height: 60px;
    color: #00ffff;
    border: 1px solid #00FFCC;
    line-height: 26px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    text-align: center;
    position: relative;
    top: 15px;
    right: 130px;

    span {
      position: absolute;
      display: inline-block;
      width: 55px;
      height: 2px;
      background: #00ffff;
      top: 30px;
      left: 150px;
    }
  }



  .fuzizi {
    width: 150px;
    height: 60px;
    color: #00ffff;
    border: 1px solid #00FFCC;
    line-height: 26px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    text-align: center;
    position: relative;
    top: 30px;

    // top: -200px;
    span {
      position: absolute;
      display: inline-block;
      width: 2px;
      height: 20px;
      background: #00ffff;
      top: 60px;
      left: 75px;
    }
  }

  .box {
    width: auto;
    height: auto;
    // position: absolute;
    margin: 50px 0 0 0;
    display: flex;
    top: 150px;
    left: 10px;

    .zi {
      width: 140px;
      height: 60px;
      background: rgba(0, 0, 0, 0.6);
      border: 1px solid #00FFCC;
      font-size: 20px;
      border-radius: 4px;
      position: relative;
      margin: 0 10px 0 0;
      display: flex;
      justify-content: center;
      align-items: center;
      line-height: 28px;

      p {
        width: 148px;
        height: 22px;
        border: solid 1px #00ffff;
        border-right: none;
        border-bottom: none;
        position: absolute;
        top: -22px;
        left: 70px;
      }

      font {
        height: 100%;
        white-space: nowrap;
        overflow: hidden;
        word-break: keep-all;
        text-overflow: ellipsis;
      }

      span {
        display: inline-block;
        width: 2px;
        height: 24px;
        background: #00ffff;
        position: absolute;
        bottom: -23px;
        left: 20px;
      }
    }

    .btnBox {
      position: absolute;
      right: -20px;
      display: flex;
      flex-direction: column;
      flex-wrap: wrap;
      width: 20px;
      height: 20px;

      .el-button.is-circle {
        padding: 1px !important;
      }
      :deep(.el-button:hover){
        width: 15px;
        height: 15px;
      }
    }

    .zi1 {
      width: 140px;
      height: 60px;
      background: rgba(0, 0, 0, 0.6);
      border: 1px solid #00FFCC;
      font-size: 20px;
      border-radius: 4px;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl；*/
      text-align: center;

      p {
        // width: 93px;
        height: 22px;
        border: solid 1px #00ffff;
        border-left: none;
        border-bottom: none;
        position: absolute;
        top: -22px;
        left: 68px;
      }

      font {
        height: 100%;
        white-space: nowrap;
        overflow: hidden;
        word-break: keep-all;
        text-overflow: ellipsis;
      }

      span {
        display: inline-block;
        width: 2px;
        height: 24px;
        background: #00ffff;
        position: absolute;
        bottom: -23px;
        left: 20px;
      }
    }

    .zi:hover,
    .zi1:hover {
      background: linear-gradient(0deg, #0177bb 0%, #0096ff 98%);
      color: #fff;
    }

    .activeGroup {
      background: linear-gradient(0deg, #0177bb 0%, #0096ff 98%);
      color: #fff;
    }
  }
}

.logic-three {
  width: 460px;
  // height: 200px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  flex-direction: column;
  overflow-x: auto;
  position: relative;

  div {
    font-size: 20px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #ffffff;
  }

  .fu {
    width: 150px;
    height: 60px;
    color: #00ffff;
    border: 1px solid #00FFCC;
    line-height: 26px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    text-align: center;
    position: relative;
    top: 0px;

    // top: -200px;
    span {
      position: absolute;
      display: inline-block;
      width: 2px;
      height: 30px;
      background: #00ffff;
      top: 60px;
      left: 75px;
    }
  }

  .fuzi {
    width: 150px;
    height: 60px;
    color: #00ffff;
    border: 1px solid #00FFCC;
    line-height: 26px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    text-align: center;
    position: relative;
    top: 15px;
    right: 130px;

    span {
      position: absolute;
      display: inline-block;
      width: 55px;
      height: 2px;
      background: #00ffff;
      top: 30px;
      left: 150px;
    }
  }



  .fuzizi {
    width: 150px;
    height: 60px;
    color: #00ffff;
    border: 1px solid #00FFCC;
    line-height: 26px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    text-align: center;
    position: relative;
    top: 30px;

    // top: -200px;
    span {
      position: absolute;
      display: inline-block;
      width: 2px;
      height: 20px;
      background: #00ffff;
      top: 60px;
      left: 75px;
    }
  }

  .box {
    width: auto;
    height: auto;
    // position: absolute;
    margin: 50px 0 0 0;
    display: flex;
    top: 150px;
    left: 10px;

    .zi {
      width: 140px;
      height: 60px;
      background: rgba(0, 0, 0, 0.6);
      border: 1px solid #00FFCC;
      font-size: 20px;
      border-radius: 4px;
      position: relative;
      margin: 0 10px 0 0;
      display: flex;
      justify-content: center;
      align-items: center;
      line-height: 28px;

      p {
        width: 148px;
        height: 22px;
        border: solid 1px #00ffff;
        border-right: none;
        border-bottom: none;
        position: absolute;
        top: -22px;
        left: 70px;
      }

      font {
        height: 100%;
        white-space: nowrap;
        overflow: hidden;
        word-break: keep-all;
        text-overflow: ellipsis;
      }

      span {
        display: inline-block;
        width: 2px;
        height: 24px;
        background: #00ffff;
        position: absolute;
        bottom: -23px;
        left: 20px;
      }
    }

    .btnBox {
      position: absolute;
      right: -20px;
      display: flex;
      flex-direction: column;
      flex-wrap: wrap;
      width: 20px;
      height: 20px;

      .el-button.is-circle {
        padding: 1px !important;
      }

      :deep(.el-button:hover) {
        width: 15px;
        height: 15px;
      }
    }

    .zi1 {
      width: 140px;
      height: 60px;
      background: rgba(0, 0, 0, 0.6);
      border: 1px solid #00FFCC;
      font-size: 20px;
      border-radius: 4px;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl；*/
      text-align: center;

      p {
        // width: 93px;
        height: 22px;
        border: solid 1px #00ffff;
        border-left: none;
        border-bottom: none;
        position: absolute;
        top: -22px;
        left: 68px;
      }

      font {
        height: 100%;
        white-space: nowrap;
        overflow: hidden;
        word-break: keep-all;
        text-overflow: ellipsis;
      }

      span {
        display: inline-block;
        width: 2px;
        height: 24px;
        background: #00ffff;
        position: absolute;
        bottom: -23px;
        left: 20px;
      }
    }

    .zi:hover,
    .zi1:hover {
      background: linear-gradient(0deg, #0177bb 0%, #0096ff 98%);
      color: #fff;
    }

    .activeGroup {
      background: linear-gradient(0deg, #0177bb 0%, #0096ff 98%);
      color: #fff;
    }
  }
}
</style>
